package com.whq.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.whq.dao.CaptchaMapper;
import com.whq.entity.Captcha;
import com.whq.service.CaptchaService;

@Service(value = "tdCaptchaService")
public class CaptchaServiceImpl implements CaptchaService {

    @Autowired
    private CaptchaMapper<Captcha>tdCaptchaMapper;
    
    @Override
    public Integer insertSelective(Captcha tdCaptcha) throws Exception {
           return this.tdCaptchaMapper.insertSelective(tdCaptcha);
        }

    @Override
    public Integer insertBatch(List<Captcha> tdCaptcha) throws Exception {
           return this.tdCaptchaMapper.insertBatch(tdCaptcha) ;
        }

    @Override
    public Integer deleteByPrimaryKey(Object id) {
            return this.tdCaptchaMapper.deleteByPrimaryKey(id);
    }

    public Integer deleteBatchByPrimaryKey(List<Object> ids) {
           return this.tdCaptchaMapper.deleteBatchByPrimaryKey(ids);
    }

    @Override
    public Integer updateByPrimaryKeySelective(Captcha tdCaptcha) {
           return this.tdCaptchaMapper.updateByPrimaryKeySelective(tdCaptcha);
    }

    @Override
    public Captcha findById(Object id) {
           return (Captcha) this.tdCaptchaMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Captcha> selectByCondition(Captcha tdCaptcha) {
           return (List<Captcha>) this.tdCaptchaMapper.selectByCondition(tdCaptcha);
    }

    @Override
    public Integer selectCountByCondition(Captcha tdCaptcha) {
           return  this.tdCaptchaMapper.selectCountByCondition(tdCaptcha);
    }

}
